﻿<%@ Page Title="Registrer Bruger" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="signup.aspx.cs" Inherits="UCNKompetenceBors.Login.signup" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div class="contentBoxLarge floatLeft">
        <div id="signupContent" class="floatLeft">
            <asp:Panel ID="panCreateUserForm" runat="server">
                <div class="inputFormLarge floatLeft">
                    <div class="inputFormLargeLeft floatLeft">
                        <div class="inputFormLargeRow floatLeft">
                            <asp:Label ID="lblSignupFormHeader" runat="server" Text="Sign Up for Your New Account" CssClass="contentTitle"></asp:Label>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblUserName" runat="server" Text="User Name: " AssociatedControlID="txtUserName"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtUserName" runat="server" Width="450px" MaxLength="100"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalUserName" runat="server" ErrorMessage="User Name is required" ToolTip="User Name is required" Text="*" ControlToValidate="txtUserName" ValidationGroup="CreateUserForm" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:CustomValidator ID="cusvalUserName" runat="server" ErrorMessage="The specified User Name is already in use" ToolTip="The specified User Name is already in use" ControlToValidate="txtUserName" ValidationGroup="CreateUserForm" Text="*" ForeColor="Red" Display="Dynamic" OnServerValidate="cusvalUserName_ServerValidate"></asp:CustomValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblPassword" runat="server" Text="Password: " AssociatedControlID="txtPassword"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtPassword" runat="server" Width="450px" MaxLength="100" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalPassword" runat="server" ErrorMessage="Password is required" ToolTip="Password is required" Text="*" ControlToValidate="txtPassword" ValidationGroup="CreateUserForm" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regexvalPasswordStrength" runat="server" ErrorMessage="Password needs to be at least 8 characters long" ToolTip="Password needs to be at least 8 characters long" ValidationGroup="CreateUserForm" ValidationExpression="(\s*(\S)\s*){8,}" ControlToValidate="txtPassword" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblConfirmPassword" runat="server" Text="Confirm Password: " AssociatedControlID="txtPassword"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtConfirmPassword" runat="server" Width="450px" MaxLength="100" TextMode="Password"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalConfirmPassword" runat="server" ErrorMessage="Confirm Password is required" ToolTip="Confirm Password is required" Text="*" ControlToValidate="txtConfirmPassword" ValidationGroup="CreateUserForm" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:CompareValidator ID="compvalConfirmPassword" runat="server" ErrorMessage="The passwords entered do not match" ToolTip="The passwords entered do not match" Text="*" ForeColor="Red" ControlToValidate="txtConfirmPassword" ControlToCompare="txtPassword" Display="Dynamic"></asp:CompareValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblEmail" runat="server" Text="Email: " AssociatedControlID="txtEmail"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtEmail" runat="server" Width="450px" MaxLength="100"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalEmail" runat="server" ErrorMessage="Email is required" ToolTip="Email is required" Text="*" ControlToValidate="txtEmail" ValidationGroup="CreateUserForm" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regexvalEmail" runat="server" ErrorMessage="The e-mail entered is invalid." ValidationExpression="^.+@[^\.].*\.[a-z]{2,}$" ControlToValidate="txtEmail" ValidationGroup="CreateUserForm" ToolTip="The e-mail entered is invalid." Display="Dynamic" Text="*" ForeColor="Red"></asp:RegularExpressionValidator>
                                <asp:CustomValidator ID="cusvalEmail" runat="server" ErrorMessage="The Email that you entered already exists" ToolTip="The Email that you entered Email already exists" ControlToValidate="txtEmail" ValidationGroup="CreateUserForm" Text="*" ForeColor="Red" Display="Dynamic" OnServerValidate="cusvalEmail_ServerValidate"></asp:CustomValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <asp:Label ID="lblAdditionalInfo" runat="server" Text="Additional Information" CssClass="contentTitle"></asp:Label>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblFirstName" runat="server" Text="First Name: " AssociatedControlID="txtFirstName"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtFirstName" runat="server" Width="450px" MaxLength="50"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalFirstName" runat="server" ErrorMessage="First Name is required" ToolTip="First Name is required" Text="*" ControlToValidate="txtFirstName" ValidationGroup="CreateUserForm" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblLastName" runat="server" Text="Last Name: " AssociatedControlID="txtLastName"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtLastName" runat="server" Width="450px" MaxLength="50"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfvalLastName" runat="server" ErrorMessage="Last Name is required" ToolTip="Last Name is required" Text="*" ControlToValidate="txtLastName" ValidationGroup="CreateUserForm" ForeColor="Red"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormLargeCellLeft floatLeft">
                                <asp:Label ID="lblPhone" runat="server" Text="Phone (Optional): " AssociatedControlID="txtPhone"></asp:Label>
                            </div>
                            <div class="inputFormLargeCellRight floatLeft">
                                <asp:TextBox ID="txtPhone" runat="server" Width="450px" MaxLength="15"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="regexvalPhone" runat="server" ErrorMessage="The specified phone number is invalid" ToolTip="The specified phone number is invalid" ValidationGroup="CreateUserForm" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtPhone" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="floatLeft">
                                <asp:Label ID="lblBiography" runat="server" Text="Bio (Optional):"></asp:Label>
                                <br />
                                <br />
                                <CKEditor:CKEditorControl ID="ckeditorBiography" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
                            </div>
                        </div>

                        <div class="inputFormLargeRow floatLeft">
                            <div class="inputFormButtonMargin floatRight">
                                <asp:Button ID="btnCreateUser" runat="server" Text="Create User" CssClass="button" OnClick="btnCreateUser_Click" ValidationGroup="CreateUserForm" />
                            </div>
                        </div>
                    </div>

                    <div class="inputFormLargeRight floatRight">
                        <asp:ValidationSummary ID="valsumSignupForm" runat="server" ForeColor="Red" HeaderText="The following errors were detected:" ValidationGroup="CreateUserForm" />
                    </div>
                </div>
            </asp:Panel>

            <asp:Label ID="lblConfirmCreatedUser" runat="server"></asp:Label>
        </div>
    </div>
</asp:Content>
